<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<script src="http://libs.baidu.com/jquery/2.1.1/jquery.min.js"></script>
	<button id="b01">单机</button>
	<button id="b02">单机</button>
<script type="text/javascript">
	var d=new Date();
	var json ={username:"margo",password:"123456"};
	
	$(document).ready(function(){
		  $("#b01").click(function(){			  
			  $.ajax({
		             type: "POST",
		             contentType : "application/json",
		             url: "http://localhost:8080/sw/mobile/mobileservice/userinfo.iep",
		             data: json,
		             dataType: "json",
		             success: function(data){
		                      console.log("OK");
		                      }
		         });
			  
			  
			  
			  
		 });
	});
	
	console.log(JSON.stringify(json));
	
	$(document).ready(function(){
		  $("#b02").click(function(){			  
			  $.ajax({
		             type: "POST", 
			         contentType:"application/json;charset=utf-8", 
		             url: "http://localhost:8080/sw/mobile/mobileservice/requestbody/userinfo.iep",
		             data: JSON.stringify(json),
		             dataType: "json",
		             success: function(data){
		                      console.log("OK");
		                      }
		         });
			  
			  
			  
			  
		 });
	});
</script>
</body>
</html>